<?php

/**
 * @Author:      dx
 * @DateTime:    2016-2-16 13:49:41
 * @Description: 用于管理mkt 系统的管理账户
 */
class MktUser extends Eloquent  {


    protected $table = 'mkt_user';

    public static $status = array(
        1 => '正常',
        2 => '冻结',
        3 => '删除',
    );
    

    public static $title = array(
        "1"=>"店长",
        "2"=>"总监",
        "3"=>"前台",
    );

    public static function make($pwd){
        return strtoupper(md5($pwd));
    }

    
    public static function findUserByUP($user_name,$password){
        return MktUser::where("user_name", $user_name)->where("password", $password)->first();
    }
  
}
